package test;

import cn.edu.sdjzu.xg.bysj.domain.Teacher;
import cn.edu.sdjzu.xg.bysj.service.DepartmentService;
import cn.edu.sdjzu.xg.bysj.service.SchoolService;
import cn.edu.sdjzu.xg.bysj.domain.Department;
import cn.edu.sdjzu.xg.bysj.domain.School;
import cn.edu.sdjzu.xg.bysj.service.TeacherService;

import java.sql.SQLException;

public class Add_department_test {
    public static void main(String[] args) throws SQLException, ClassNotFoundException {

        //获取school对象，以便为DepartmentToAdd的school属性赋值
        School school = SchoolService.getInstance().find(6);
        //创建DepartmentToAdd对象
        Department departmentToAdd =
                new Department("第六","06","",school);
        DepartmentService.getInstance().add(departmentToAdd);

    }
}